package com.molin.DateTest.jdk8DateTest;

import java.time.DayOfWeek;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class Demo3 {
    /*
public int getYear()   获取年
public int getMonthValue()  获取月份（1-12）
public int getDayOfMonth()  获取月份中的第几天（1-31）
public int getDayOfYear()   获取一年中的第几天
public DayOfWeek getDayOfWeek()  获取星期
public int getMinute()   获取分钟
public int getHour()  获取小时*/

    public static void main(String[] args) {
        LocalDateTime localDateTime=LocalDateTime.of(2020,11,11,11,11,11);
        System.out.println(localDateTime.getYear());
        System.out.println(localDateTime.getMonthValue());
        System.out.println(localDateTime.getDayOfMonth());
        System.out.println(localDateTime.getDayOfYear());
        DayOfWeek dow=localDateTime.getDayOfWeek();
        System.out.println(dow
        );
        System.out.println(localDateTime.getMinute());
        System.out.println(localDateTime.getHour());

    }
}
